# -*- coding: utf-8 -*-
# @Time        :2025/4/7 16:45
# @Author      :文刀水寿
# @File        : app.py.py
"""
 @Description :
"""
from flask import Flask, render_template, jsonify

app = Flask(__name__)
app.config['DEBUG'] = True


@app.route('/')
def home():
    return 'Flask home11566'

@app.route('/index')
def idnex():
    # 返回字符串
    # return '<b>Flask Index<b>'

    # 模板渲染
    return render_template('index.html', name='刘涛')

    # JSON
    # jsonify ： 序列化 将字典转换为json
    # return jsonify({'name': '张三', 'age': 33})


if __name__ == '__main__':
    # debug=True
    app.run(debug=True, port=5000)